<?php
/*
 * @Author: your name
 * @Date: 2020-11-10 13:44:09
 * @LastEditTime: 2020-12-17 15:28:53
 * @LastEditors: Please set LastEditors
 * @Description: 服务端更新日志控制器
 * @FilePath: /special/application/adminapiv3/controller/platform_manage/log/ServerUpdateLogController.php
 */

namespace app\adminapiv3\controller\platform_manage\log;


use app\adminapiv3\controller\BaseController;
use app\adminapiv3\service\platform_manage\log\ServerUpdateLogService;
use think\Request;

class ServerUpdateLogController extends BaseController
{
    /**
     * @name 总览
     * @author wx
     * @date 2020/5/8 10:22
     */
    public function hostUpdateList(Request $request)
    {
        $input = $request->only(['id','name','ip','client_version','client_update_status'], 'get');
        $this->validate($input, 'ServerUpdateLog.list');
        $server = new ServerUpdateLogService();
        $data = $server->hostUpdateList($input);

        return $this->jsonOutPut($data);
    }
    /**
     * @name 单独客户端更新日志详情
     * @author wx
     * @date 2019/11/25 10:45
     */
    public function list(Request $request)
    {
        $input = $request->only(['host_id', 'old_version', 'new_version', 'ip', 'status', 'desc', 'ctime'], 'get');
        $this->validate($input, 'ServerUpdateLog.details');

        $server = new ServerUpdateLogService();
        $data = $server->details($input);

        return $this->jsonOutPut($data);
    }
}